package router

import (
	"github.com/gin-gonic/gin"
	jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
	"tuowei.com/app/api/apis"
	"tuowei.com/common/middleware"
)

func init() {
	routerCheckRole = append(routerCheckRole, registerSysScoreRouter)
}

func registerSysScoreRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	order := apis.SysScore{}
	r := v1.Group("/score").Use(authMiddleware.MiddlewareFunc()).Use(middleware.CheckLogin)
	//获取积分列表
	r.POST("/get/list", order.GetPages)
	//新增积分记录
	r.POST("/add", order.AddScore)
	//获取我的总积分
	r.POST("/sum", order.GetSum)
}
